<!-- 单号库存 -->
<div class="inventoryInfo-table">
    <div class="inventoryInfo-search-box">
        <div style="width:100%;padding-left:40px">
            <!--搜索渠道单号-->
            <div class="search-cell" style="width: 30%" ng-if="module==='channelNumber'">
                <span><%=orderNumber_table_channelNumber%></span>
                <div class="select-box" style="width: 68%">
                    <input ng-model="tableModel.restData.channelNumber" autocomplete="off" maxlength="30"
                           class="input-text" type="text">
                </div>
            </div>
            <!--搜索运单号-->
            <div class="search-cell" style="width: 30%;padding-left: 15px;" ng-if="module==='waybillNumber'">
                <span><%=orderNumber_table_waybillNumber%></span>
                <div class="select-box" style="width: 71%">
                    <input ng-model="tableModel.restData.waybillNumber" autocomplete="off" maxlength="30"
                           class="input-text" type="text">
                </div>
            </div>
            <!--搜索生成时间-->
            <div class="search-cell" style="width: 50%">
                <span><%=orderNumber_table_createTime%></span>
                <div class="select-box" style="padding:0px;width: 40%">
                    <input ng-model="invertoryBeginTime" readonly="readonly" id="invertory-begin-time"
                           ng-trim="false" type="text" maxlength="30" autocomplete="off">
                </div>
                <span style="padding-left: 6px;">-</span>
                <div class="select-box" style="padding:0px;width: 40%">
                    <input ng-model="invertoryEndTime" readonly="readonly" id="invertory-end-time"
                           ng-trim="false" type="text" maxlength="30" autocomplete="off">
                </div>
            </div>
        </div>
        <div style="padding: 15px 15px 0px 54px">
            <!--搜索批次号-->
            <div class="search-cell" style="width: 30%">
                <span><%=orderNumber_table_batchNumber%></span>
                <div class="select-box" style="width: 70%">
                    <input ng-model="searchBatchNumber" autocomplete="off" maxlength="30"
                           class="input-text" type="text">
                </div>
            </div>
            <!--搜索服务-->
            <div class="search-cell" style="width: 28.5%;padding-left: 23px" ng-if="module==='channelNumber'">
                <span><%=orderNumber_table_service%></span>
                <div class="select-box" style="width: 79%">
                    <input ng-trim="false" class="input-text" id="search-inventoryService" autocomplete="off" type="text"
                           ng-click="getSearchInventoryServiceData()" ng-model="service" readonly>
                </div>
            </div>
            <!--搜索产品组-->
            <div class="search-cell" style="width: 45%;padding-left: 8px;" ng-if="module==='waybillNumber'">
                <span><%=orderNumber_table_productTeam%></span>
                <div class="select-box" style="width: 80%">
                    <div style="width: 48%;display: inline-block;position: relative;">
                        <input ng-trim="false" id="search-inventoryProductTeam-first" ng-model="inventoryInfoProductTeamFirst"
                               placeholder="<%=orderNumber_select_all%>" readonly
                               ng-click="getSearchProductTeamFirstData()" type="text" class="input-text" >
                        <i class="select-icon icon-drop-down" style="z-index: 3"></i>
                    </div>
                    <div style="width: 48%;display: inline-block;position: relative;">
                        <input ng-trim="false" id="search-inventoryProductTeam-leaf" ng-model="inventoryInfoProductTeamLeaf"
                               placeholder="<%=orderNumber_select_all%>" readonly
                               ng-click="getSearchProductTeamLeafData()" type="text" class="input-text">
                        <i class="select-icon icon-drop-down" style="z-index: 3"></i>
                    </div>
                </div>
            </div>
            <div style="display: inline-block;float: right" ng-if="module==='channelNumber'">
                <span ng-click="resetData()" class="btn btn-reset"><%=common_clear_data%></span>
                <button ng-click="getTable(true);" class="btn btn-primary" style="padding:0 30px;position:relative;top:2px">
                    <%=orderNumber_tab_search%>
                </button>
            </div>
        </div>
        <div style="padding: 15px 15px 0px 44px" ng-if="module==='waybillNumber'">
            <!--搜索产品-->
            <div class="search-cell" style="width: 30%;padding-left: 23px">
                <span><%=orderNumber_add_product%></span>
                <div class="select-box" style="width: 75%">
                    <input ng-trim="false" class="input-text" id="search-inventoryProduct" autocomplete="off" type="text"
                           ng-click="getSearchInventoryProductData()" ng-model="product" readonly>
                </div>
            </div>
            <div style="display: inline-block;float: right">
                <span ng-click="resetData()" class="btn btn-reset"><%=common_clear_data%></span>
                <button ng-click="getTable(true);" class="btn btn-primary" style="padding:0 30px;position:relative;top:2px">
                    <%=orderNumber_tab_search%>
                </button>
            </div>
        </div>
    </div>
    <div class="batch-operation">
        <button ng-click="createNumber();" class="btn btn-primary">
            <%=orderNumber_button_createNumber%>
        </button>
        <button ng-click="loadNumber();" class="btn btn-primary" ng-if="module==='channelNumber'">
            <%=orderNumber_button_loadNumber%>
        </button>
    </div>
    <div class="table-container" ng-controller="tableController">
        <table class="rule-table-info table-box" cellpadding="0" cellspacing="0">
            <thead>
            <tr>
                <th ng-repeat="item in tableModel.tableHeader" style="width:{{tableModel.tableHeaderSize[$index]}}">{{item}}</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="value in tableModel.tableBody" ng-init="renderFinish($last)">
                <td title="{{value.batchNumber}}">
                    <a href="javascript:;" ng-click="editNumber(value.batchNumber)"
                       ng-bind-html="value.batchNumber | trustHtml:tableModel.restData.batchNumber">
                    </a>
                </td>
                <td ng-if="module==='waybillNumber'" title="{{value.customerName}}">{{value.customerName}}</td>
                <td ng-if="module==='waybillNumber'" title="{{value.refIdName}}">{{value.refIdName}}</td>
                <td title="{{value.refUidName}}">{{value.refUidName}}</td>
                <td ng-if="module==='channelNumber'" title="{{value.refIdName}}">{{value.refIdName}}</td>
                <td title="{{value.startSerialNumber}}">{{value.startSerialNumber}}</td>
                <td title="{{value.endSerialNumber}}">{{value.endSerialNumber}}</td>
                <td title="{{value.unusedTotal+'/'+value.total}}">{{value.unusedTotal+'/'+value.total}}</td>
                <td title="{{value.createTime}}">{{value.createTime}}</td>
            </tr>
            </tbody>
        </table>
        <hnapagination table-service="table" page-table-model="tableModel"></hnapagination>
    </div>

    <div ng-show="!tableModel.pagination.isVisiblePage" style="position: absolute;top:265px;bottom:0px;width:100%;">
        <img style="width:100%;height:100%;" src="/public/img/undefined.svg">
    </div>
    <div class="download-file-box-inventory" style="display:none;"></div>
    <iframe name="download-iframe-inventory" style="display:none;"></iframe>
</div>

<!--生成单号-->
<div ng-show="nestInventoryInfoFrom" id="nest-inventoryInfoFrom" class="prompt-modal middle-box" style="display:none">
    <div class="prompt-wrap">
        <div class="bomb-box inventoryInfo-box">
            <div class="title"><%=orderNumber_button_createNumber%></div>
            <div class="prompt-content">
                <form name="inventoryInfoFrom" novalidate="novalidate" style="height: 100%">
                    <ul class="isContainer switch-list" style="height: 100%">
                        <!--服务-->
                        <li ng-show="module==='channelNumber'">
                            <label><b>*</b><%=orderNumber_table_service%>：</label>
                            <input ng-trim="false" class="input-text" readonly ng-required="serviceInventoryRequired"
                                   id="service-inventory" ng-click="getServiceInventoryData()"
                                   name="serviceInventory" ng-model="serviceInventory" type="text" >
                            <div class="verification">
                                <span class="errors" ng-show="inventoryInfoFrom.serviceInventory.$dirty"></span>
                            </div>
                        </li>
                        <!--产品组-->
                        <li ng-show="module==='waybillNumber'">
                            <label><b>*</b><%=orderNumber_table_productTeam%>：</label>
                            <input ng-trim="false" class="input-text" readonly ng-required="clienteleInventoryRequired"
                                   id="productTeam-inventory" ng-click="getProductTeamInventoryData()"
                                   name="productTeamInventory" ng-model="productTeamInventory" type="text">
                            <i class="regexWeiRuleIcon icon-drop-down"></i>
                        </li>
                        <!--产品-->
                        <li ng-show="module==='waybillNumber'">
                            <label><%=orderNumber_add_product%>：</label>
                            <input ng-trim="false" class="input-text" id="product-inventory" ng-click="getProductInventoryData()"
                                   ng-disabled="productInventoryDisabled"
                                   name="productInventory" ng-model="productInventory" type="text" readonly>
                        </li>
                        <!--客户-->
                        <li ng-show="module==='waybillNumber'">
                            <label><%=orderNumber_table_clientele%>：</label>
                            <input ng-trim="false" class="input-text" id="clientele-inventory" ng-click="getClienteleInventoryData()"
                                   name="clienteleInventory" ng-model="clienteleInventory" type="text" readonly>
                        </li>
                        <!--生成数量-->
                        <li>
                            <label><b>*</b><%=orderNumber_add_createAll%>：</label>
                            <input ng-trim="false" class="input-text" name="createAllInventory" ng-model="createAllInventory" type="text" maxlength="4"
                                   verification="{'ruleType':'positiveinteger'}" required>
                            <div class="verification">
                                <span class="errors"
                                      ng-show="inventoryInfoFrom.createAllInventory.$viewValue &&
                                      inventoryInfoFrom.createAllInventory.$error.defined &&
                                      inventoryInfoFrom.createAllInventory.$dirty">
                                    {{inventoryInfoFrom.createAllInventory.errorTips}}
                                </span>
                            </div>
                        </li>
                    </ul>
                </form>
            </div>
            <div class="operation">
                <button ng-click="closeInventory();" name="prompt-close" class="btn btn-default" data-event="close"><%=orderNumber_button_cancel%></button>
                <button ng-click="saveInventory();" name="prompt-save" class="btn btn-primary" data-event="close"><%=orderNumber_button_create%></button>
            </div>
        </div>
    </div>
</div>

<!--批次详情-->
<div ng-show="editInventoryInfo" id="nest-editInventoryInfoFrom" class="prompt-modal middle-box" style="display:none">
    <div class="prompt-wrap">
    <div class="bomb-box inventoryInfo-box">
        <div class="title"><%=orderNumber_table_batchDetail%></div>
            <div class="prompt-editContent">
                <div>
                    <span class="left-text"><%=orderNumber_add_createWay%>：</span>
                    <span class="right-text">{{createWayInventory}}</span>
                </div>
                <div>
                    <span class="left-text"><%=orderNumber_add_operator%>：</span>
                    <span class="right-text">{{operatorInventory}}</span>
                </div>
            </div>
            <div class="operation">
                <button ng-click="closeInventory();" name="prompt-close" class="btn btn-primary" data-event="close"><%=orderNumber_button_close%></button>
            </div>
        </div>
    </div>
</div>

<!--导入单号-->
<div ng-show="nestLoadNumber" id="nest-loadNumber" class="prompt-modal middle-box" style="display:none">
    <div class="prompt-wrap">
        <div class="bomb-box loadNumber-box">
            <div class="title"><%=orderNumber_button_loadNumber%></div>
            <div class="prompt-content" style="top: 40px;">
                <form name="loadNumberFrom" novalidate="novalidate">
                    <div class="div-loadNumber">
                        <p><%=orderNumber_state_loadNumber%></p>
                        <!--导入服务-->
                        <div class="service-loadNumber" >
                            <label><b>*</b><%=orderNumber_table_service%>：</label>
                            <input ng-trim="false" class="input-text serviceLoadNumberInput" id="service-loadNumber" type="text"
                                   placeholder="<%=orderNumber_service_placeholder%>" ng-click="getServiceLoadNumberData()"
                                   name="serviceLoadNumber" ng-model="serviceLoadNumber" required readonly ng-show="canLoadNumber">
                            <div class="verification">
                                <span class="errors" ng-show="loadNumberFrom.serviceLoadNumber.$dirty"></span>
                            </div>
                            <span ng-hide="canLoadNumber">{{serviceLoadNumber}}</span>
                        </div>
                        <div class="table-loadNumber" ng-hide="uploadNumbering">
                            <div class="loadNumber-group">
                                <img src="../public/img/icon-group.svg">
                                <span><%=orderNumber_table_loadNumber%></span>
                            </div>
                            <input type="file" file-model="avatarFile"
                                   accept=".xls,.xlsx,.xlt,.xltx,application/msword"
                                   class="loadNumber-file">
                        </div>
                        <div class="table-loadNumber" ng-show="uploadNumbering">
                            <table class="table-box table-box-loadNumber" cellpadding="0" cellspacing="0">
                                <thead>
                                    <tr>
                                        <th width="70%"><%=orderNumber_table_no%></th>
                                        <th width="30%"><%=orderNumber_table_ver%></th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr ng-repeat="value in uploadResult" ng-show="hasUploadResultData">
                                        <td ng-show="value.canImport" width="70%">{{value.serialNumber}}</td>
                                        <td ng-show="value.canImport" width="30%">{{value.status}}</td>
                                        <td style="color: #EE494D;text-align: center;" width="70%" ng-hide="value.canImport">{{value.serialNumber}}</td>
                                        <td style="color: #EE494D;text-align: center;" width="30%" ng-hide="value.canImport">{{value.status}}</td>
                                    </tr>
                                    <tr ng-hide="hasUploadResultData">
                                       <td colspan="2"><%=orderNumber_table_noData%></td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </form>
            </div>
            <div class="operation">
                <button ng-click="closeLoadNumber();" name="prompt-close" class="btn btn-default" data-event="close"><%=orderNumber_button_cancel%></button>
                <button ng-click="saveLoadNumber();" ng-disabled="canLoadNumber" name="prompt-save" class="btn btn-primary" data-event="close"><%=orderNumber_button_load%></button>
            </div>
        </div>
    </div>
</div>